<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Flex 导航条</title>
    <style>
        * {
            outline: 1px #ccc solid;
            margin: 10px;
            padding: 10px;
            
        }

        .inner {
            background: rosybrown;
        }

        div#container
         {
             display: flex;
            flex-direction:row-reverse;
            flex-wrap: wrap-reverse;
            width:300px;
            height: 300px;

        }
    </style>
</head>

<body>
    <div id="container">
        <div class="inner">A</div>
        <div class="inner">BB</div>
        <div class="inner">CCC</div>
        <div class="inner">DDDD</div>
        <div class="inner">EEEEE</div>
        <div class="inner">FFFFFF</div>
        <div class="inner">GGGGGGGG</div>
        <div class="inner">HHHHHHHHH</div>
        <div class="inner">LLLLLLLLLLL</div>
        <div class="inner">JJJJJJJJJJJJ</div>
    </div>
</body>


</html>